import request from "@/utils/request";

// 查询收听历史列表
export function listHistory(query) {
  return request({
    url: "/history/history/list",
    method: "get",
    params: query,
  });
}

// 查询收听历史详细
export function getHistory(historyId) {
  return request({
    url: "/history/history/" + historyId,
    method: "get",
  });
}

// 新增收听历史
export function addHistory(data) {
  return request({
    url: "/history/history",
    method: "post",
    data: data,
  });
}

// 修改收听历史
export function updateHistory(data) {
  return request({
    url: "/history/history",
    method: "put",
    data: data,
  });
}

// 删除收听历史
export function delHistory(historyId) {
  return request({
    url: "/history/history/" + historyId,
    method: "delete",
  });
}
